package com.design.behavior.observer.cainiao;

/**
 * @ProjectName: design
 * @Package: com.design.behavior.observer.cainiao
 * @ClassName: HexaObserver
 * @Author: shenaiguo
 * @Description:
 * @Date: 2020/11/23 0023 20:31
 */
public class HexaObserver extends Observer{

    public HexaObserver(Subject subject){
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println( "Hex String: "
                + Integer.toHexString( subject.getState() ).toUpperCase() );
    }
}